﻿using CommunityToolkit.Mvvm.ComponentModel;
using Company.Database.Entities;
using Company.Shell.Interfaces;

namespace Company.Shell.Services
{
    abstract class Base
    {
       public virtual void Show() { }
        public void Print() { }

    }
    class Child : Base
    {
        public override void Show()
        {
            base.Show();
        }

        public new void Print()
        {

        }
    }
    class Session : ObservableObject, ISession
    {
        private UserEntity userEntity = new();
        /// <summary>
        /// 当前登录用户
        /// </summary>
        public UserEntity CurrentUser
        {
            get { return userEntity; }
            set { SetProperty(ref userEntity, value); }
        }

        public void Add(UserEntity user)
        {
            CurrentUser = user;
        }
    }
}
